﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Routing;
using Orchard.Localization;
using Orchard.UI.Navigation;

namespace Wicresoft.Movies
{
    public class AdminMenu : INavigationProvider
    {
        public Localizer T { get; set; }


        #region
        public string MenuName
        {
            get { return "admin"; }

        }
        public void GetNavigation(NavigationBuilder builder)
        {

            builder.Add(T("Movies"), "5", BuildMenu);
        }
        #endregion

        private void BuildMenu(NavigationBuilder menu)
        {
            menu.Add(T("Movies List"), "1.0",
              item => item.Action("List", "Admin", new { area = "Contents", id = "Movie" }));
            menu.Add(T("Movies Create"), "1.1",
                item => item.Action("Create", "Admin", new { area = "Contents", id = "Movie" }));
            menu.Add(T("Actors"), "2.0", item =>
                 item.Action("Index", "ActorsAdmin", new { area = "Wicresoft.Movies" }));
        }
    }
}